// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addTable POST /api/tables/add */
export async function addTableUsingPost(body: API.TablesAddDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/api/tables/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteTable DELETE /api/tables/delete */
export async function deleteTableUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteTableUsingDELETEParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/tables/delete', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getFields GET /api/tables/get/fields */
export async function getFieldsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getFieldsUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTablesFieldsVo_>('/api/tables/get/fields', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listTable POST /api/tables/list */
export async function listTableUsingPost(
  body: API.TablesListDto,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListTables_>('/api/tables/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listTableById GET /api/tables/list/id */
export async function listTableByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listTableByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTables_>('/api/tables/list/id', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** testJoin POST /api/tables/test/join */
export async function testJoinUsingPost(
  body: API.TableTestJoinDto,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTableJoinTestVo_>('/api/tables/test/join', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateTable PUT /api/tables/update */
export async function updateTableUsingPut(
  body: API.TablesUpdateDto,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/tables/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
